﻿using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using ZLDC.Common.Estate;

namespace ZLDC.Estate.TM
{
    public partial class BuildAdd : _PageBase
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                ZLDC.Topo.BLL.Estate.SystemParamBLL.LoadParamType(sType, false, "类型");
                ZLDC.Topo.BLL.Estate.SystemParamBLL.LoadUsage(sUsage, false, "用途");

                int id = _Request.GetInt("id", 0);
                int eid = _Request.GetInt("eid", 0);    // 楼盘基本信息ID(t_estate表)
                hID.Value = id.ToString();
                hEID.Value = eid.ToString();                

                lbEstateName.Text = ZLDC.Topo.BLL.Estate.EstateBLL.EstateNameById(eid);

                LoadBuild(eid, lbEstateName.Text);
            }
        }

        /// <summary>
        /// 加载某楼盘下的的有栋阁
        /// </summary>
        private void LoadBuild(int eid, string estateName)
        {
            ZLDC.Topo.BLL.Estate.BuildBLL.LoadBuild(sBuild, eid, estateName);           
        }

    }
}
